## API Report File for "@backstage/plugin-kubernetes-backend"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { AuthenticationStrategy as AuthenticationStrategy_2 } from '@backstage/plugin-kubernetes-node';
import { AuthMetadata as AuthMetadata_2 } from '@backstage/plugin-kubernetes-node';
import { CatalogApi } from '@backstage/catalog-client';
import { ClusterDetails as ClusterDetails_2 } from '@backstage/plugin-kubernetes-node';
import { Config } from '@backstage/config';
import { CustomResource as CustomResource_2 } from '@backstage/plugin-kubernetes-node';
import { Duration } from 'luxon';
import express from 'express';
import * as k8sAuthTypes from '@backstage/plugin-kubernetes-node';
import { KubernetesClustersSupplier as KubernetesClustersSupplier_2 } from '@backstage/plugin-kubernetes-node';
import { KubernetesCredential as KubernetesCredential_2 } from '@backstage/plugin-kubernetes-node';
import { KubernetesFetcher as KubernetesFetcher_2 } from '@backstage/plugin-kubernetes-node';
import { KubernetesObjectsProvider as KubernetesObjectsProvider_2 } from '@backstage/plugin-kubernetes-node';
import { KubernetesRequestAuth } from '@backstage/plugin-kubernetes-common';
import type { KubernetesRequestBody } from '@backstage/plugin-kubernetes-common';
import { KubernetesServiceLocator as KubernetesServiceLocator_2 } from '@backstage/plugin-kubernetes-node';
import { Logger } from 'winston';
import { ObjectToFetch as ObjectToFetch_2 } from '@backstage/plugin-kubernetes-node';
import { PermissionEvaluator } from '@backstage/plugin-permission-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { RequestHandler } from 'http-proxy-middleware';
import { TokenCredential } from '@azure/identity';

// @public (undocumented)
export class AksStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(
    _: ClusterDetails_2,
    requestAuth: KubernetesRequestAuth,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public (undocumented)
export class AnonymousStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public @deprecated (undocumented)
export type AuthenticationStrategy = k8sAuthTypes.AuthenticationStrategy;

// @public @deprecated (undocumented)
export type AuthMetadata = k8sAuthTypes.AuthMetadata;

// @public (undocumented)
export class AwsIamStrategy implements AuthenticationStrategy_2 {
  constructor(opts: { config: Config });
  // (undocumented)
  getCredential(
    clusterDetails: ClusterDetails_2,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public (undocumented)
export class AzureIdentityStrategy implements AuthenticationStrategy_2 {
  constructor(logger: Logger, tokenCredential?: TokenCredential);
  // (undocumented)
  getCredential(): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public @deprecated (undocumented)
export type ClusterDetails = k8sAuthTypes.ClusterDetails;

// @public @deprecated
export function createRouter(options: RouterOptions): Promise<express.Router>;

// @public @deprecated (undocumented)
export type CustomResource = k8sAuthTypes.CustomResource;

// @public @deprecated (undocumented)
export type CustomResourcesByEntity = k8sAuthTypes.CustomResourcesByEntity;

// @public (undocumented)
export const DEFAULT_OBJECTS: ObjectToFetch[];

// @public
export class DispatchStrategy implements AuthenticationStrategy_2 {
  constructor(options: DispatchStrategyOptions);
  // (undocumented)
  getCredential(
    clusterDetails: ClusterDetails_2,
    auth: KubernetesRequestAuth,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(authMetadata: AuthMetadata_2): Error[];
}

// @public (undocumented)
export type DispatchStrategyOptions = {
  authStrategyMap: {
    [key: string]: AuthenticationStrategy_2;
  };
};

// @public @deprecated (undocumented)
export type FetchResponseWrapper = k8sAuthTypes.FetchResponseWrapper;

// @public (undocumented)
export class GoogleServiceAccountStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public (undocumented)
export class GoogleStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(
    _: ClusterDetails_2,
    requestAuth: KubernetesRequestAuth,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public
export const HEADER_KUBERNETES_AUTH: string;

// @public
export const HEADER_KUBERNETES_CLUSTER: string;

// @public (undocumented)
export class KubernetesBuilder {
  constructor(env: KubernetesEnvironment);
  // (undocumented)
  addAuthStrategy(key: string, strategy: AuthenticationStrategy_2): this;
  // (undocumented)
  build(): KubernetesBuilderReturn;
  // (undocumented)
  protected buildAuthStrategyMap(): {
    [key: string]: AuthenticationStrategy_2;
  };
  // (undocumented)
  protected buildClusterSupplier(
    refreshInterval: Duration,
  ): KubernetesClustersSupplier_2;
  // (undocumented)
  protected buildCustomResources(): CustomResource_2[];
  // (undocumented)
  protected buildFetcher(): KubernetesFetcher_2;
  // (undocumented)
  protected buildHttpServiceLocator(
    _clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesServiceLocator_2;
  // (undocumented)
  protected buildMultiTenantServiceLocator(
    clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesServiceLocator_2;
  // (undocumented)
  protected buildObjectsProvider(
    options: KubernetesObjectsProviderOptions,
  ): KubernetesObjectsProvider_2;
  // (undocumented)
  protected buildProxy(
    logger: Logger,
    clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesProxy;
  // (undocumented)
  protected buildRouter(
    objectsProvider: KubernetesObjectsProvider_2,
    clusterSupplier: KubernetesClustersSupplier_2,
    catalogApi: CatalogApi,
    proxy: KubernetesProxy,
    permissionApi: PermissionEvaluator,
  ): express.Router;
  // (undocumented)
  protected buildServiceLocator(
    method: ServiceLocatorMethod,
    clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesServiceLocator_2;
  // (undocumented)
  protected buildSingleTenantServiceLocator(
    clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesServiceLocator_2;
  // (undocumented)
  static createBuilder(env: KubernetesEnvironment): KubernetesBuilder;
  // (undocumented)
  protected readonly env: KubernetesEnvironment;
  // (undocumented)
  protected fetchClusterDetails(
    clusterSupplier: KubernetesClustersSupplier_2,
  ): Promise<ClusterDetails_2[]>;
  // (undocumented)
  protected getAuthStrategyMap(): {
    [key: string]: AuthenticationStrategy_2;
  };
  // (undocumented)
  protected getClusterSupplier(): KubernetesClustersSupplier_2;
  // (undocumented)
  protected getFetcher(): KubernetesFetcher_2;
  // (undocumented)
  protected getObjectsProvider(
    options: KubernetesObjectsProviderOptions,
  ): KubernetesObjectsProvider_2;
  // (undocumented)
  protected getObjectTypesToFetch(): ObjectToFetch_2[] | undefined;
  // (undocumented)
  protected getProxy(
    logger: Logger,
    clusterSupplier: KubernetesClustersSupplier_2,
  ): KubernetesProxy;
  // (undocumented)
  protected getServiceLocator(): KubernetesServiceLocator_2;
  // (undocumented)
  protected getServiceLocatorMethod(): ServiceLocatorMethod;
  // (undocumented)
  setAuthStrategyMap(authStrategyMap: {
    [key: string]: AuthenticationStrategy_2;
  }): void;
  // (undocumented)
  setClusterSupplier(clusterSupplier?: KubernetesClustersSupplier_2): this;
  // (undocumented)
  setDefaultClusterRefreshInterval(refreshInterval: Duration): this;
  // (undocumented)
  setFetcher(fetcher?: KubernetesFetcher_2): this;
  // (undocumented)
  setObjectsProvider(objectsProvider?: KubernetesObjectsProvider_2): this;
  // (undocumented)
  setProxy(proxy?: KubernetesProxy): this;
  // (undocumented)
  setServiceLocator(serviceLocator?: KubernetesServiceLocator_2): this;
}

// @public
export type KubernetesBuilderReturn = Promise<{
  router: express.Router;
  clusterSupplier: KubernetesClustersSupplier_2;
  customResources: CustomResource_2[];
  fetcher: KubernetesFetcher_2;
  proxy: KubernetesProxy;
  objectsProvider: KubernetesObjectsProvider_2;
  serviceLocator: KubernetesServiceLocator_2;
  authStrategyMap: {
    [key: string]: AuthenticationStrategy_2;
  };
}>;

// @public @deprecated (undocumented)
export type KubernetesClustersSupplier =
  k8sAuthTypes.KubernetesClustersSupplier;

// @public @deprecated (undocumented)
export type KubernetesCredential = k8sAuthTypes.KubernetesCredential;

// @public (undocumented)
export interface KubernetesEnvironment {
  // (undocumented)
  catalogApi: CatalogApi;
  // (undocumented)
  config: Config;
  // (undocumented)
  logger: Logger;
  // (undocumented)
  permissions: PermissionEvaluator;
}

// @public @deprecated (undocumented)
export type KubernetesFetcher = k8sAuthTypes.KubernetesFetcher;

// @public @deprecated (undocumented)
export type KubernetesObjectsProvider = k8sAuthTypes.KubernetesObjectsProvider;

// @public (undocumented)
export interface KubernetesObjectsProviderOptions {
  // (undocumented)
  config: Config;
  // (undocumented)
  customResources: k8sAuthTypes.CustomResource[];
  // (undocumented)
  fetcher: k8sAuthTypes.KubernetesFetcher;
  // (undocumented)
  logger: Logger;
  // (undocumented)
  objectTypesToFetch?: k8sAuthTypes.ObjectToFetch[];
  // (undocumented)
  serviceLocator: k8sAuthTypes.KubernetesServiceLocator;
}

// @public @deprecated (undocumented)
export type KubernetesObjectTypes = k8sAuthTypes.KubernetesObjectTypes;

// @public
export class KubernetesProxy {
  constructor(options: KubernetesProxyOptions);
  // (undocumented)
  createRequestHandler(
    options: KubernetesProxyCreateRequestHandlerOptions,
  ): RequestHandler;
}

// @public
export type KubernetesProxyCreateRequestHandlerOptions = {
  permissionApi: PermissionEvaluator;
};

// @public
export type KubernetesProxyOptions = {
  logger: Logger;
  clusterSupplier: KubernetesClustersSupplier;
  authStrategy: AuthenticationStrategy;
};

// @public @deprecated (undocumented)
export type KubernetesServiceLocator = k8sAuthTypes.KubernetesServiceLocator;

// @public @deprecated (undocumented)
export type ObjectFetchParams = k8sAuthTypes.ObjectFetchParams;

// @public (undocumented)
export type ObjectsByEntityRequest = KubernetesRequestBody;

// @public @deprecated (undocumented)
export type ObjectToFetch = k8sAuthTypes.ObjectToFetch;

// @public (undocumented)
export class OidcStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(
    clusterDetails: ClusterDetails_2,
    authConfig: KubernetesRequestAuth,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(authMetadata: AuthMetadata_2): Error[];
}

// @public (undocumented)
export interface RouterOptions {
  // (undocumented)
  catalogApi: CatalogApi;
  // (undocumented)
  clusterSupplier?: KubernetesClustersSupplier;
  // (undocumented)
  config: Config;
  // (undocumented)
  discovery: PluginEndpointDiscovery;
  // (undocumented)
  logger: Logger;
  // (undocumented)
  permissions: PermissionEvaluator;
}

// @public (undocumented)
export class ServiceAccountStrategy implements AuthenticationStrategy_2 {
  // (undocumented)
  getCredential(
    clusterDetails: ClusterDetails_2,
  ): Promise<KubernetesCredential_2>;
  // (undocumented)
  presentAuthMetadata(_authMetadata: AuthMetadata_2): AuthMetadata_2;
  // (undocumented)
  validateCluster(): Error[];
}

// @public (undocumented)
export type ServiceLocatorMethod = 'multiTenant' | 'singleTenant' | 'http';

// @public @deprecated (undocumented)
export type ServiceLocatorRequestContext =
  k8sAuthTypes.ServiceLocatorRequestContext;

// @public (undocumented)
export type SigningCreds = {
  accessKeyId: string | undefined;
  secretAccessKey: string | undefined;
  sessionToken: string | undefined;
};
```
